package service

import (
	"github.com/crack007/go-im/src/common/config"
	"github.com/crack007/go-im/src/common/model"
	"google.golang.org/grpc"
)

var EtcdService = &etcdService{}

var RedisService = &redisService{}

var UserService = &userService{}

var GrpcService = &grpcService{nodeMap: map[string]*grpc.ClientConn{}}

var NodeService = &nodeService{}

var NoticeService = &noticeService{}

var SnowflakeService *snowflakeService

func RegisterCommonService() {
	SnowflakeService = &snowflakeService{
		Snowflake: &model.Snowflake{},
		Config:    config.GetSnowflakeConfig(),
	}
}
